package design.patterns.creational.simplefactory;

/**
 * @author gjx
 * @version v1.0
 * @Description
 * @date 2019/3/29 9:20
 */
public class ComputerFactory {

    public static Computer createComputer(String name){
        Computer computer = null;
        if("lenovo".equals(name)){
            computer = new LenovoComputer("联想拯救者");
        }else if("apple".equals(name)){
            computer  = new AppleComputer("MacBook Air");
        }
        return computer;
    }



}
